Skip to content

ci(docs): read the Cloudflare Pages token from Secret Manager with GitHub OIDC (RB-7896) - #365

Merged
isac322 merged 1 commit into
mainfrom
isac/rb-7896-docs-oidc
Nov 17, 2026
Merged

isac322 merged 1 commit into
mainfrom
isac/rb-7896-docs-oidc

Conversation

@isac322

@isac322 isac322 commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

무엇을

docs 배포가 Cloudflare 토큰을 저장소 시크릿 대신 Secret Manager(beardrive-docs-cloudflare-api-token)에서 GitHub OIDC로 읽습니다. 인증·토큰 읽기·배포 단계는 main에서만 돕니다.

왜

토큰을 바꿀 때마다 사람이 저장소 시크릿에 복사하지 않도록 합니다 (RB-7896). 읽기 권한은 main 실행에만 있어서 PR이나 다른 브랜치는 토큰을 읽지 못합니다.

리뷰어가 정할 것

  • 배포 조건이 github.event_name != 'pull_request'에서 github.ref == 'refs/heads/main'으로 바뀝니다. 다른 브랜치에서 수동 실행하면 지금은 --branch=main으로 배포되지만, 이제는 빌드만 합니다(OIDC 권한도 main에만 있음).

적용 후 확인

  1. 먼저 runbear-io/terraform의 권한 PR(https://github.com/runbear-io/terraform/pull/643)이 적용되어야 합니다.
  2. 이 PR 머지 = 워크플로 파일 변경이므로 main에서 docs 배포가 돕니다. 성공을 확인한 뒤 저장소 시크릿 CLOUDFLARE_API_TOKEN을 지웁니다.
Agent notes
  • actionlint passed. Same google-github-actions/auth@v3 + provider path as runbear-io/searchd deploy.yml, without service_account (direct WIF).
  • Not run end to end: needs the terraform apply first; the merge itself is the first real run.

@isac322 isac322 self-assigned this Nov 17, 2026
@isac322
isac322 requested a review from runbear-bot November 17, 2026 05:16

@runbear-bot runbear-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bobb's bot(Totoro) Review

Conclusion: ready-with-notes

  • 변경된 워크플로는 main push에서만 Google OIDC 인증·Secret Manager 토큰 조회·Cloudflare Pages 배포를 수행하고, PR/다른 브랜치 실행은 빌드로 제한합니다.
  • contents: read와 id-token: write 권한, Secret Manager 출력 참조, 기존 CLOUDFLARE_ACCOUNT_ID 시크릿 사용 계약을 diff 기준으로 확인했으며, 변경 라인에 해당하는 merge-blocking 결함은 없습니다.
  • Terraform 권한 PR 적용 전에는 실제 배포를 검증할 수 없습니다. 이 clean checkout에는 로컬 패키지 도구/의존성이 없어 패키지 테스트는 실행하지 않았습니다.

@isac322
isac322 merged commit ecd3318 into main Nov 17, 2026
6 checks passed
@isac322
isac322 deleted the isac/rb-7896-docs-oidc branch November 17, 2026 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants